package com.cx.mapper;


import com.cx.pojo.User;
import com.cx.pojo.UserExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer userId);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByUserNameAndPwd(@Param("userName")String userName,@Param("pwd")String pwd);

    User selectByPhone(String userPhone);

    int changePassword(int userId,String password);

    String findByUserId(int userId);

    int register(String userName,String userPassword,String userPhone);

    int updateUser(Integer userId, String userIdentity);

    int selectUserName(String userName);

    String selectByKey(Integer userId);
}